-- GENERATED SPELL FOR [Vacillating Voidcaller] --


function spell0_19527(pUnit, Event) --@Arcane Missiles,n/a--
pUnit:FullCastSpellOnTarget(34447,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19527', 623, 1)
end

function spell1_19527(pUnit, Event) --@Coalesce,Self--
pUnit:FullCastSpellOnTarget(34302,pUnit)
pUnit:RegisterEvent('Sorts_19527', 1500, 1)
end

function spell2_19527(pUnit, Event) --@Damage Reduction: Arcane,Self--
pUnit:FullCastSpellOnTarget(34331,pUnit)
pUnit:RegisterEvent('Sorts_19527', 549, 1)
end

function spell3_19527(pUnit, Event) --@Damage Reduction: Fire,Self--
pUnit:FullCastSpellOnTarget(34333,pUnit)
pUnit:RegisterEvent('Sorts_19527', 630, 1)
end

function spell4_19527(pUnit, Event) --@Damage Reduction: Frost,Self--
pUnit:FullCastSpellOnTarget(34334,pUnit)
pUnit:RegisterEvent('Sorts_19527', 608, 1)
end

function spell5_19527(pUnit, Event) --@Damage Reduction: Holy,Self--
pUnit:FullCastSpellOnTarget(34336,pUnit)
pUnit:RegisterEvent('Sorts_19527', 587, 1)
end

function spell6_19527(pUnit, Event) --@Damage Reduction: Nature,Self--
pUnit:FullCastSpellOnTarget(34335,pUnit)
pUnit:RegisterEvent('Sorts_19527', 584, 1)
end

function spell7_19527(pUnit, Event) --@Damage Reduction: Shadow,Self--
pUnit:FullCastSpellOnTarget(34338,pUnit)
pUnit:RegisterEvent('Sorts_19527', 598, 1)
end

function spell8_19527(pUnit, Event) --@De-Materialize,Self--
pUnit:FullCastSpellOnTarget(34842,pUnit)
pUnit:RegisterEvent('Sorts_19527', 1500, 1)
end

function spell9_19527(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(34348,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19527', 2000, 1)
end

function spell10_19527(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(34347,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19527', 6000, 1)
end

function spell11_19527(pUnit, Event) --@Holy Bolt,n/a--
pUnit:FullCastSpellOnTarget(34346,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19527', 2000, 1)
end

function spell12_19527(pUnit, Event) --@Lightning Bolt,n/a--
pUnit:FullCastSpellOnTarget(34345,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19527', 2000, 1)
end

function spell13_19527(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(34344,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19527', 2000, 1)
end

function Sorts_19527(pUnit, Event)
local choix_sorts_19527 = math.random(0, 13)
if choix_sorts_19527 == 0 then
pUnit:RegisterEvent('spell0_19527', 1, 1)
end
if choix_sorts_19527 == 1 then
pUnit:RegisterEvent('spell1_19527', 1, 1)
end
if choix_sorts_19527 == 2 then
pUnit:RegisterEvent('spell2_19527', 1, 1)
end
if choix_sorts_19527 == 3 then
pUnit:RegisterEvent('spell3_19527', 1, 1)
end
if choix_sorts_19527 == 4 then
pUnit:RegisterEvent('spell4_19527', 1, 1)
end
if choix_sorts_19527 == 5 then
pUnit:RegisterEvent('spell5_19527', 1, 1)
end
if choix_sorts_19527 == 6 then
pUnit:RegisterEvent('spell6_19527', 1, 1)
end
if choix_sorts_19527 == 7 then
pUnit:RegisterEvent('spell7_19527', 1, 1)
end
if choix_sorts_19527 == 8 then
pUnit:RegisterEvent('spell8_19527', 1, 1)
end
if choix_sorts_19527 == 9 then
pUnit:RegisterEvent('spell9_19527', 1, 1)
end
if choix_sorts_19527 == 10 then
pUnit:RegisterEvent('spell10_19527', 1, 1)
end
if choix_sorts_19527 == 11 then
pUnit:RegisterEvent('spell11_19527', 1, 1)
end
if choix_sorts_19527 == 12 then
pUnit:RegisterEvent('spell12_19527', 1, 1)
end
if choix_sorts_19527 == 13 then
pUnit:RegisterEvent('spell13_19527', 1, 1)
end
end

function mob19527_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_19527', math.random(1500, 3000), 1)
end

function mob19527_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19527_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19527_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(19527, 1, 'mob19527_Action')
RegisterUnitEvent(19527, 2, 'mob19527_Leave')
RegisterUnitEvent(19527, 3, 'mob19527_Kill')
RegisterUnitEvent(19527, 4, 'mob19527_Die')
